include_directories("${CMAKE_SOURCE_DIR}/third_party/openscenegraph/include")
include_directories("${CMAKE_BINARY_DIR}/third_party/openscenegraph/include")

file(GLOB HEADS "*.h" "*.hpp")
file(GLOB SRCS  "*.c" "*.cpp" "*.ui")

set(OSG_KEYS
    osg
    osgAnimation
    osgDB
    osgFX
    osgGA
    osgManipulator
    osgParticle
    osgPresentation
    osgShadow
    osgSim
    osgTerrain
    osgText
    osgUI
    osgUtil
    osgViewer
    osgVolume
    osgWidget
)

foreach (LIBRARY ${OSG_KEYS})
    list(APPEND OSG_LIBRARY_FILE_NAMES ${LIBRARY})
endforeach()

set(EXEC ${PROJECT_NAME})
add_executable(${EXEC} ${HEADS} ${SRCS})
target_link_libraries(${EXEC} ${OSG_LIBRARY_FILE_NAMES})

